{template 'common/header'}
<ul class="nav nav-tabs">
	<li><a href="{php echo $this->createWebUrl('page',array('op' =>'display'))}">文章管理</a></li>
	<li{if $operation == 'edit'} class="active" {/if}><a href="{php echo $this->createWebUrl('item',array('op' =>'edit'))}">编辑文章</a></li>
</ul>
<form action="{php echo $this->createWebUrl('page', array('op' => 'edit'))}" method="post" class="form-horizontal form" enctype="multipart/form-data">
	<input type="hidden" name="id" value="{$detail['page_id']}" />
	<div class="panel panel-default we7-panel">
		<div class="panel-heading">编辑文章</div>
		<div class="panel-body we7-padding">
		    <div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序：</label>
				<div class="col-sm-9 col-xs-12">
					<input type="text" name="data[displayorder]" class="form-control" value="{$detail['displayorder']}" />
					<span class="help-block">降序</span>
				</div>
			</div>

			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">文章标题</label>
				<div class="col-sm-9">
					<input type="text" name="data[title]" class="form-control" value="{$detail['title']}" placeholder="请填写文章标题" />
				</div>
			</div>
           <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
                <div class="col-sm-9">
               		{php echo tpl_form_field_image('data[thumb]', $detail['thumb'], '', array('width' => 420, 'height' => 335))}
                    <span class="help-block" style="color:#f00">请上传分享图标，建议尺寸420X335像素</span>
                </div>
            </div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享描述</label>
				<div class="col-sm-9">
					<textarea rows="3" name="data[desc]"  class="form-control"  placeholder="请填写文章分享描述" />{$detail['desc']}</textarea>
				</div>
			</div>
			<div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">作者头像</label>
                <div class="col-sm-9">
               		{php echo tpl_form_field_image('data[avatar]', $detail['avatar'], '', array('width' => 200, 'height' => 200))}
                    <span class="help-block" style="color:#f00">请上传作者头像，建议尺寸200X200像素</span>
                </div>
            </div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">作者昵称</label>
				<div class="col-sm-9">
					<input type="text" name="data[name]" class="form-control" value="{$detail['name']}" placeholder="请填写作者昵称" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">文章发布时间：</label>
				<div class="col-sm-9 col-xs-12">
					{php echo tpl_form_field_date('post_time',date('Y-m-d H:i:s',$detail['post_time']),true);}
				</div>
			</div>
			<div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">文章内容</label>
                <div class="col-sm-9">
                    {php echo tpl_ueditor('data[content]',$detail['content'],['height' => 500]);}
                </div>
            </div>
			<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">是否显示：</label>
					<div class="col-sm-9 col-xs-12">
						<label class="radio-inline"><input type="radio" name="data[is_show]" value="1" {if $detail['is_show'] == 1}checked="true"{/if} /> 显示</label>
						&nbsp;&nbsp;&nbsp;
						<label class="radio-inline"><input type="radio" name="data[is_show]" value="0" {if $detail['is_show'] == 0}checked="true"{/if} /> 隐藏</label>
					</div>
			</div>
			<div class="form-group">
				<div class="col-md-6 col-sm-offset-3 col-md-offset-2">
					<input name="submit" type="submit" value="提交保存" class="btn btn-primary" />
					<input type="hidden" name="token" value="{$_W['token']}" />
				</div>
			</div>
		</div>
	</div>
</form>
<script>
</script>
{template 'common/footer'}